using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_OPENHARMONY
public class TestFoldable : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        OpenHarmonyJSCallback callback = new OpenHarmonyJSCallback(args =>
        {
            string type = args[0].As<string>();
            string data = args[1].As<string>();
            Debug.Log("[test] type=" + type + ", data=" + data);
            return null;
        });
        
        
        Debug.Log("[test] start");
        OpenHarmonyJSClass openHarmonyJsClass = new OpenHarmonyJSClass("FoldableManager");
        openHarmonyJsClass.CallStatic("start", callback);
        
        Debug.Log("[test] isFolable=" + openHarmonyJsClass.CallStatic<bool>("isFoldable"));
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

#endif